const { task } = require("hardhat/config");

task("mint-nft").setAction(async(args, hre) => {
    const { firstAccount } = await getNamedAccounts()
    const nft = await ethers.getContract("MyToken", firstAccount)

    console.log("minting nft from contract")
    const mintTx = await nft.safeMint(firstAccount)
    mintTx.wait(6)
    console.log("minted nft successfully")
})

module.exports = {}